
<html>
  <head>
    <title>SPL - Resultados da Consulta</title>
  <meta name="layout" content="adminMenuLayout" />
  </head>
  <body>
    <div class ="nav">
      <span class="menuButton"><a class="home" href="${createLink(uri: '/')}">Pagina Inicial</a></span>
    </div>
    <h1>Resultados da Consulta</br></h1>
    <div class="list">
      <div align="center"><h1>Exemplares</h1></br></div>
      <table>
        <thead>
          <tr>

        <g:sortableColumn property="livro" title="${message(code: 'exemplar.titulo.label', default: 'Livro')}" params ="${params}"/>

        <g:sortableColumn property="fornecedor" title="${message(code: 'exemplar.fornecedor.label', default: 'Fornecedor')}" params ="${params}"/>

        <g:sortableColumn property="dataDeAquisicao" title="${message(code: 'livro.dataDeAquisicao.label', default: 'Data de Aquisicao')}" params ="${params}"/>
        
        <g:sortableColumn property="indice" title="Detalhes" />

        </tr>
        </thead>
        <tbody>
        <g:each in="${pesquisaExemplar}" status="i" var="exemplarInstance">
          <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">

            <td>${fieldValue(bean: exemplarInstance, field: "livro")}</td>

            <td>${fieldValue(bean: exemplarInstance, field: "fornecedor")}</td>

            <td>${fieldValue(bean: exemplarInstance, field: "dataDeAquisicao")}</td>
            
            <td><g:link action="show" id="${exemplarInstance.isbnItem}">
                              Ver mais</g:link></td>

        </tr>
        </g:each>
        </tbody>
      </table>
    </div>

            <div class="paginateButtons">
        <g:paginate total="${pesquisaExemplar.count()}" />
        </div>

        <g:jasperReport action="createReportExemplarComplete" controller="exemplar" format="PDF" jasper="Relatorio SPL - Exemplar Completo" name="Relatorio SPL - PDF"/>
        <g:jasperReport action="createReportExemplarComplete" controller="exemplar" format="XLS" jasper="Relatorio SPL - Exemplar Completo" name="Relatorio SPL - XLS"/>
        <g:jasperReport action="createReportExemplarComplete" controller="exemplar" format="ODT" jasper="Relatorio SPL - Exemplar Completo" name="Relatorio SPL - ODT"/>
        <g:jasperReport action="createReportExemplarComplete" controller="exemplar" format="DOCX" jasper="Relatorio SPL - Exemplar Completo" name="Relatorio SPL - DOCX"/>

  <div align="center"><br></br><g:link action='search'>Pesquisar Novamente</g:link></div>
</body>
</html>